package com.paas.form.constant;

public class FormConstant {


    public enum ChangeTypeEnum {
        VIEW_CHANGE_TYPE("1","定版视图变更"),
        FOEM_CHANGE_TYPE("2","表单变更");

        private String type;
        private String name;

        private ChangeTypeEnum(String type, String name) {
            this.type = type;
            this.name = name;
        }
        /**
         * 描述:获取枚举
         * @param type
         * @return
         */
        public static ChangeTypeEnum parse(String type){
            type=type.trim();
            for (ChangeTypeEnum item : ChangeTypeEnum.values()){
                if(type.equals(item.type)){
                    return item;
                }
            }
            return null;
        }

        /**
         * 描述:获取值
         * @return
         */
        public String getType() {
            return type;
        }

        public String getName() {
            return name;
        }
    }

    //变更操作枚举
    public enum ChangeOperationEnum {
        A,M,D;
        public static ChangeOperationEnum parse(String type){
            type=type.trim();
            for (ChangeOperationEnum item : ChangeOperationEnum.values()){
                if(type.equals(item.name())){
                    return item;
                }
            }
            return null;
        }
    }

    /**-------------------------------------定义变更表业务状态-----------------------------------------------------------*/
    /**
     * 反对 失效
     */
    public static final String CHANGE_OPERATION_CANCEL = "40";

    /**
     * 审批通过
     */
    public static final String CHANGE_OPERATION_SUCCESS = "30";

    /**
     * 审批中
     */
    public static final String CHANGE_OPERATION_APPROVAL = "10";

    /**
     * 审批不通过
     */
    public static final String CHANGE_OPERATION_NOAPPROVE = "20";



}
